package com.cadre.service;

import java.util.List;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;

import com.cadre.dao.MatterMapper;
import com.cadre.dao.UserMapper;
import com.cadre.entity.Matter;
import com.cadre.entity.User;

@Service
@Transactional
public class MatterServiceImpl {
	 @Autowired
	   private MatterMapper mattermapper;
	 
	 //新建重大事项
	 public boolean addMatter(Matter matter){
		return mattermapper.addMatter(matter);
	 }

	 //查询所有的事项
	 public List<Matter> selectAllMatter(){
		return mattermapper.selectAllMatter();
	 }
	 
	 //删除事项
	 public boolean deleteByid(Integer id){
		return mattermapper.deleteByid(id); 
	 }
	 
	 //通过ID查找某个事项
	 public Matter selectMatter(Integer id){
		return mattermapper.selectMatter(id);
	 }
	 
	 //此处更改
	 public boolean updateMatter(Matter matter){
		return mattermapper.updateMatter(matter);
		 
	 }
}
